new Vue({
    el: '#app',
    data: {
        num:0,
        sexlist: [{
            id: 1,
            sex: '男'
        }, {
            id: 2,
            sex: '女'
        }],
        AD:'',
        hospitalName:'',
        departmentName:'',
        name:'',
        age:'',
        city:'',
    },
    methods: {
        toggle(index) {
            this.num=index;
        },
        vaild(){
            if(this.AD==''){
                this.$toast("住院号不能为空")
            }
            else if(this.hospitalName==''){
                this.$toast("医院名称不能为空")
            }
            else if(this.departmentName==''){
                this.$toast("科室名称不能为空")
            }
            else if(this.name==''||this.name.length>4){
                this.$toast("姓名不正确")
            }
            else if(this.age==''||this.age>120){
                this.$toast("年龄不能为空或输入有误")
            }
            else if(this.city==''){
                this.$toast("所在地不能为空")
            }
            else{
                localStorage.setItem('gofist',1);
                window.location.href="SRISDio.html"
            }
        }
    },
})